﻿using YNTK.Common.Const;
using YNTK.Common.Entity;
using SqlSugar;

namespace YNTK.FileRecord.Entitys
{
    /// <summary>
    /// 工作记录基类
    /// </summary>
    [SugarTable("filerecord_workrecords")]
    [Tenant(ClaimConst.TENANT_ID)]
    public class WorkRecordsEntity : CLDEntityBase
    {
        /// <summary>
        /// 所属组织id
        /// </summary>
        [SugarColumn(ColumnName = "F_OrganizeId", ColumnDescription = "所属组织id", ColumnDataType = "nvarchar(50)")]
        public string OrganizeId { get; set; }

        /// <summary>
        /// 所属机构id
        /// </summary>
        [SugarColumn(ColumnName = "F_MechanismId", ColumnDescription = "所属机构id")]
        public string MechanismId { get; set; }

        /// <summary>
        /// 文件清单分类id
        /// </summary>
        [SugarColumn(ColumnName = "F_ClassifyId", ColumnDescription = "文件清单分类id")]
        public string ClassifyId { get; set; }

        /// <summary>
        /// 工作项/事项id
        /// </summary>
        [SugarColumn(ColumnName = "F_WorkItemId", ColumnDescription = "工作项/事项id")]
        public string WorkItemId { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [SugarColumn(ColumnName = "F_Title", ColumnDescription = "标题")]
        public string Title { get; set; }

        /// <summary>
        /// 排序码
        /// </summary>
        [SugarColumn(ColumnName = "F_SortCode")]
        public long? SortCode { get; set; }

        /// <summary>
        /// 共享范围(0.全组织 1.特定机构 2.特定角色 3.特定用户 4.仅自己可见)
        /// </summary>
        [SugarColumn(ColumnName = "F_SharedScope", ColumnDescription = "共享范围(0.全组织 1.特定机构 2.特定角色 3.特定用户 4.仅自己可见)")]
        public int SharedScope { get; set; }

        /// <summary>
        /// 共享范围,多个机构/角色/用户按逗号分割,SharedScope为0或4时为空
        /// </summary>
        [SugarColumn(ColumnName = "F_SharedScopeValue", ColumnDescription = "共享范围,多个机构/角色/用户按逗号分割,SharedScope为0或4时为空")]
        public string SharedScopeValue { get; set; }

        /// <summary>
        /// 浏览次数
        /// </summary>
        [SugarColumn(ColumnName = "F_ViewCount", ColumnDescription = "浏览次数")]
        public int ViewCount { get; set; }
    }
}
